package com.awo.blackfacedetect.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.util.Log;

import com.awo.blackfacedetect.util.ActivityCollector;

public class BaseActivity extends AppCompatActivity {

    private static final String TAG = "BaseActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d(TAG, "show Activity: " + getActivitySimpleName());
        ActivityCollector.addActivity(this);
    }

    protected String getActivitySimpleName() { return getClass().getSimpleName(); }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        ActivityCollector.removeActivity(this);
        Log.d(TAG, "destroy Activity: " + getActivitySimpleName());
    }
}